//
// Created by 67678 on 2023/3/14.
//

#include <cstdio>
#include "socketUtil.h"
#include "sys/fcntl.h"

namespace socket_epoll {
int setNonblocking(int fd) {
    int old_option = fcntl(fd, F_GETFL);
    int new_option = old_option | O_NONBLOCK;
    fcntl(fd, F_SETFL, new_option);
    return old_option;
}


}